package com.ym9527.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * 这是打卡记录实体类
 */
@Entity()
@Data
@Table(name = "school_punch_card")
public class PunchCardRecord {

    @TableGenerator(
            name="ID_GENERATOR",
            table="ID_GEN",
            pkColumnName = "GEN_NAME",
            pkColumnValue = "PUNCH_CARD_PK",
            valueColumnName = "GEN_VALUE",
            initialValue = 1,
            allocationSize = 1
    )
    @GeneratedValue(strategy= GenerationType.TABLE, generator="ID_GENERATOR")
    @Id
    @Column(name = "punch_card_id",length = 50)
    private Long  punchCardId;


    /**
     * 这是打卡时间
     */
    @Column(name = "punch_card_time")
     Date punchCardTime;

    /**
     * 这是日期字符串
     */
    @Column(name = "date_string")
     String dateString;

    /**
     * 这是打卡学生Id
     */
    @Column(name = "punch_card_student_id")
     Long punchCardStudentId;

    /**
     * 这是打卡课程id
     */
    @Column(name = "punch_card_course_id")
     Long punchCardCourseId;
}
